package com.example.client;

import com.dtflys.forest.annotation.*;
import com.dtflys.forest.http.ForestResponse;
import com.example.annotation.MyAuth;

public interface MyClient {

    @Request("${url}")
    ForestResponse<String> helloForest(@DataVariable("url")String url);

    @Request("${url}")
    String helloForest1(@DataVariable("url")String url);

    @Get(
            url = "${url}",
            sslProtocol = "SSL"
    )
    ForestResponse<String> testTruestSSLGet(@DataVariable("url")String url);

    @Post("${url}")
    @MyAuth(authorization = "${authorization}")
    ForestResponse<Object> quotations(@DataVariable("url")String url,@DataVariable("authorization")String authorization,@JSONBody String jsonText);


    @Get("${url}")
    @MyAuth(authorization = "${authorization}",username = "${settleType}")
    ForestResponse<Object> holidays(@DataVariable("url")String url,
                                    @DataVariable("authorization")String authorization,
                                    @Query("settleType")String settleType,
                                    @Query("marketIndicator")String marketIndicator);

    @Get("http://localhost:8080/v1/hello/world")
    ForestResponse<String> helloWorld();
}